Skip to content

Conversation

@babreufig
Copy link
Contributor

@babreufig babreufig commented Nov 5, 2025

Description

Implements MAD-NG TPSA Action to use MAD-NG tracked damaps to acquire optical parameters.

Important: This pull request requires at least MAD-NG version 1.1.8. There is a discrepancy in the chromaticity calculation between MAD-NG version 1.1.7 and 1.1.8, where the phix is by a factor 2 smaller in the new version. This seems to be a different convention(?). Needs a follow-up because this affects Ax/Bx/Ay/By functions which are then different between Xsuite and MAD-NG. For reference: MethodicalAcceleratorDesign/MAD-NG@5c87e03

Depends on xsuite/xdeps#106

  • Supports ranged settings with initial conditions
  • Supports full-lattice settings with and without initial conditions
  • Supports Beta functions, Alpha functions, Dispersions and Phase Advances as Targets
  • Phase Advances uses faster Twiss and TPSA as well
  • Interchangability between Xsuite ('betx', 'bety') and MAD-NG ('beta11_ng', 'beta22_ng') target names
  • Orbit targets supported (x, px, ...)
  • Changed twiss function to put coupling and chromaticities as optional flags
  • Discuss relation between zeta/t and delta/pt and use

Mandatory:

  • I have added tests to cover my changes
  • All the tests are passing, including my new ones (only tested madng tests) (bug in chromaticity calculation, unrelated to changes here)
  • I described my changes in this PR description

@babreufig babreufig changed the title WIP: Feature/madng jacobians WIP: TPSA in Xsuite Matching (Interface to MAD-NG) Nov 19, 2025
@babreufig babreufig marked this pull request as draft November 19, 2025 13:33
@babreufig
Copy link
Contributor Author

babreufig commented Nov 24, 2025

Functionality is ready. Needs follow-up because new MAD-NG version breaks two tests that rely on calculating chromaticities, as phix/phiy in MAD-NG 1.1.8 changed by a factor 2. This can be found in this commit (MethodicalAcceleratorDesign/MAD-NG@5c87e03) @giadarol

@babreufig babreufig marked this pull request as ready for review November 25, 2025 07:34
@babreufig babreufig changed the title WIP: TPSA in Xsuite Matching (Interface to MAD-NG) TPSA in Xsuite Matching (Interface to MAD-NG) Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant